package com.lx.user.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lx.bilibili.entity.Relationship;
import com.lx.bilibili.entity.User;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lx
 * @since 2025-03-26
 */
public interface RelationshipMapper extends BaseMapper<Relationship> {

    @Select("SELECT\n" +
            "	a.* \n" +
            "FROM\n" +
            "	`user` a,\n" +
            "	relationship b \n" +
            "WHERE\n" +
            "	a.id = b.uid \n" +
            "	AND b.myid = #{id}")
    List<User> getRelationshipById(int id);

}
